package org.osiris.client.services;

import org.osiris.client.model.UsuarioViewBean;

import com.google.gwt.user.client.rpc.AsyncCallback;

/**
 * Authentication service.
 * 
 * @author See Wah Cheng
 * @created 5 Jun 2009
 */
public interface AuthenticationServiceAsync {

	/**
	 * Authenticates user.
	 * 
	 * @param username
	 * @param password
	 * @param callback the callback to return whether authentication is successful
	 */
	void authenticate(String username, String password, AsyncCallback<UsuarioViewBean> callback);

	/**
	 * Terminates a user's security session.
	 */
	void logout(AsyncCallback<Void> callback);
}
